import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
 
  {
    path: '/',
    name: 'home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/regist',
    name: 'regist',
    component: () => import('../views/Regist.vue')
  },
  {
    path: '/personal',
    name: 'personal',
    component: () => import('../views/Personal.vue')
  },
  {
    path: '/fashion',
    name: 'fashion',
    component: () => import('../views/Fashion.vue')
  },
  {
    path: '/financial',
    name: 'financial',
    component: () => import('../views/Financial.vue')
  },
  {
    path: '/fun',
    name: 'fun',
    component: () => import('../views/Fun.vue')
  },
  {
    path: '/game',
    name: 'game',
    component: () => import('../views/Game.vue')
  },
  {
    path: '/healthy',
    name: 'healthy',
    component: () => import('../views/Healthy.vue')
  },
  {
    path: '/military',
    name: 'military',
    component: () => import('../views/Military.vue')
  },
  {
    path: '/sports',
    name: 'sports',
    component: () => import('../views/Sports.vue')
  },
  {
    path: '/technology',
    name: 'technology',
    component: () => import('../views/Technology.vue')
  },
  {
    path: '/tourism',
    name: 'tourism',
    component: () => import('../views/Tourism.vue')
  },
 
  {
    path: '/detailPage/:id',
    name: 'detailPage',
    component: () => import('../views/DetailsPage.vue')
  },
  {
    path: '/search/:keyword',
    name: 'search',
    component: () => import('../views/Search.vue')
  },
  {
    path: '/postNews',
    name: 'postNews',
    component: () => import('../adminView/PostNews.vue')
  },{
    path:'/adminUser',
    name: 'adminUser',
    component: () => import('../adminView/AdminUser.vue')
  },
  {
    path:'/newsList',
    name:'newsList',
    component: () => import('../adminView/NewsList.vue')
  },
  {
    path:'/adminComments',
    name:'adminComments',
    component: () => import('../adminView/AdminComments.vue')
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
